﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Report.aspx.cs" EnableEventValidation = "false" Inherits="Show_Report" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>告警总览</title>
    <script type="text/javascript" src="../Scripts/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="../Scripts/jquery-ui-1.9.2.custom.min.js"></script>
    <script type="text/javascript" src="../Scripts/CellAlarm/Report.js"></script>
    <link rel="Stylesheet" href="../Content/redmond/jquery-ui-1.9.2.custom.min.css" />
    <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" href="../Content/CellAlarm/Report.css" />
</head>
<body>
    <form id="form1" runat="server">
        <div id="conditionDiv" class="ui-corner-all">
            <p>
                <label for="Dep_A" class="lTitle">
                    区域：</label>
                <asp:DropDownList ID="Dep_A" runat="server" Enabled="false">
                </asp:DropDownList>
                <label id="secondL" for="GType_A" class="lTitle">
                    基站类别：</label>
                <asp:DropDownList ID="GType_A" runat="server">
                    <asp:ListItem Selected="True" Text="全部" Value="0"></asp:ListItem>
                    <asp:ListItem Text="A类" Value="A类"></asp:ListItem>
                    <asp:ListItem Text="B类" Value="B类"></asp:ListItem>
                    <asp:ListItem Text="C类" Value="C类"></asp:ListItem>
                </asp:DropDownList>
            </p>
            <p>
                <label for="Begin_Date" class="lTitle">
                    统计时间：</label><asp:TextBox ID="Begin_Date" runat="server" CssClass="text ui-widget-content Wdate "
                        AutoCompleteType="Disabled"></asp:TextBox>
                <label id="lendDate" for="End_Date">
                    至</label><asp:TextBox ID="End_Date" runat="server" CssClass="Wdate text ui-widget-content"
                        AutoCompleteType="Disabled"></asp:TextBox>
            </p>
            <p style="text-align: right; padding: 5px;">
                <asp:Button ID="Query" runat="server" Text="开始查询" CssClass="search" title="点击获取最新告警信息" OnClick="Query_Click" />
                <asp:Button ID="Excel_B" runat="server" Text="导出EXCEL" CssClass="print" OnClick="Excel_Click" />
            </p>
            <div class="ui-state-highlight ui-corner-all" style="padding: 0 .7em;"> 
	            <p style="padding:4px 2px;border:0;"><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span> 
	            <strong>更新时间:</strong><asp:Label ID="Date2G" runat="server"></asp:Label>
	            <asp:Label ID="Date3G" runat="server"></asp:Label>
                </p>
            </div>            
            <div class="ui-state-error ui-corner-all" style="padding: 0 .7em; margin-top:5px;" runat="server" id="FlashDiv" visible="false"> 
	            <p style="padding:4px 2px;border:0;"><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
	            <strong>今日闪断:</strong>
                    <asp:Repeater ID="FlashNow" runat="server">
                           <ItemTemplate>
                                <span style="margin-left:10px;">[<%# Eval("CELL_CHNAME")%>]<span style="font-size:small; color:#e96;">[<%# Eval("Cell_Class")%>]</span></span>
                           </ItemTemplate> 
                    </asp:Repeater>
                </p>
            </div>
            <div class="ui-state-error ui-corner-all" style="padding: 0 .7em; margin-top:5px;" runat="server" id="MoreDiv" visible="false"> 
	            <p style="padding:4px 2px;border:0;"><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
	            <strong>24-72断站预警:</strong>
                    <asp:Repeater ID="MoreWarm" runat="server">
                           <ItemTemplate>
                                <span style="margin-left:10px;">[<%# Eval("cell_chname")%>|<%# Eval("dual")%>小时]<span style="font-size:small; color:#e96;">[<%# Eval("Cell_Class")%>]</span></span>
                           </ItemTemplate> 
                    </asp:Repeater>
                </p>
            </div>
        </div>        
        <fieldset class="ui-grid-a" id="ReportBox">
        <legend>县分告警一览</legend>
        <div id="ReportDiv">
            <asp:GridView ID="Report" runat="server" AutoGenerateColumns="False" EmptyDataText="对不起,未找到相关数据！"
                Width="100%" CssClass="ui-widget ui-widget-content"
                 OnRowDataBound="Report_RowDataBound" AllowSorting="true" OnSorting="Report_Sorting">
                <HeaderStyle CssClass="ui-widget-header" />
               <RowStyle HorizontalAlign="Right" />
               <FooterStyle HorizontalAlign="Right" /> 
                <Columns>
                    <asp:BoundField DataField="COUNTY" HeaderText="县分" SortExpression="COUNTY">
                    </asp:BoundField>
                    <asp:BoundField DataField="CellAll" HeaderText="基站数量" SortExpression="CellAll" />
                    <asp:BoundField DataField="UNLINK" HeaderText="断站数" SortExpression="UNLINK" />
                    <asp:BoundField DataField="AB_Duration" HeaderText="平均断站时长" SortExpression="AB_Duration_K" />
                    <asp:BoundField DataField="UNLINKMORE" HeaderText="超长断站次数" SortExpression="UNLINKMORE" />
                    <asp:BoundField DataField="AREACount" HeaderText="小区退服" SortExpression="AREACount" />
                    <asp:BoundField DataField="AREADuration" HeaderText="小区退服时长" SortExpression="AREADurationK" />
                    <asp:BoundField DataField="FLASH" HeaderText="闪断" SortExpression="FLASH" />
                    <asp:BoundField DataField="POWER" HeaderText="停电" SortExpression="POWER" />
                    <asp:BoundField DataField="WAVE" HeaderText="驻波" SortExpression="WAVE" />
                </Columns>
            </asp:GridView>
        </div>
        </fieldset>
        <fieldset class="ui-grid-a" id="cellBox">
            <legend>基站告警一览</legend>
            <div id="CellDiv">
                <asp:GridView ID="CellView" runat="server" AutoGenerateColumns="False" EmptyDataText="对不起,未找到相关数据！"
                    Width="100%" CssClass="ui-widget ui-widget-content" OnRowCommand="CellView_RowCommand" AllowSorting="true" OnSorting="Cell_Sorting" OnRowDataBound="CellView_RowDataBound">
                    <HeaderStyle CssClass="ui-widget-header" />
                    <RowStyle HorizontalAlign="Right" />
                    <Columns>
                        <asp:BoundField DataField="COUNTY" HeaderText="县分" SortExpression="COUNTY" ItemStyle-HorizontalAlign="Center">
                        </asp:BoundField>
                        <asp:BoundField DataField="CELL_CHNAME" HeaderText="基站" SortExpression="CELL_CHNAME" ItemStyle-HorizontalAlign="Left">
                        </asp:BoundField>
                        <asp:BoundField DataField="UNLINK" HeaderText="断站数" SortExpression="UNLINK" />
                        <asp:BoundField DataField="AB_Duration" HeaderText="平均断站时长" SortExpression="AB_Duration_K"/>
                        <asp:BoundField DataField="UNLINKMORE" HeaderText="超长断站次数" SortExpression="UNLINKMORE" />
                        <asp:BoundField DataField="AREACount" HeaderText="小区退服" SortExpression="AREACount" />
                        <asp:BoundField DataField="AREADuration" HeaderText="退服时长" SortExpression="AREADurationK"/>
                        <asp:BoundField DataField="FLASH" HeaderText="闪断" SortExpression="FLASH" />
                        <asp:BoundField DataField="POWER" HeaderText="停电" SortExpression="POWER" />
                        <asp:BoundField DataField="WAVE" HeaderText="驻波" SortExpression="WAVE" />
                        <asp:BoundField DataField="TYPE" HeaderText="网别" SortExpression="TYPE" />
                        <asp:BoundField DataField="Cell_Class" HeaderText="类别" SortExpression="Cell_Class" />
                        <asp:TemplateField>
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            <ItemTemplate>
                                <asp:Button ID="Show" runat="server" Font-Size="13px" CausesValidation="false" Text="查看明细"
                                    CommandName="Show" CommandArgument='<%# Bind("CELL_CHNAME")%>' CssClass="info" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <div style="text-align: right; padding: 5px;">
                    <webdiyer:AspNetPager ID="CellPager" runat="server" OnPageChanged="CellPager_PageChanged">
                    </webdiyer:AspNetPager>
                </div>
            </div>
        </fieldset>
        <div id="LoadingDiv" style="display:none;">
        <fieldset>
            <img alt="加载中..." src="../Content/Images/loading_icon.gif" id="loadingImg" />
            <label for="loadingImg">数据正在加载中，请稍候...</label>
        </fieldset>
    </div>
    </form>
</body>
</html>
